import Loading from './loading.vue'

import { createVNode, render } from 'vue'

export default {
    install(app) {
        const vnode = createVNode(Loading)
        render(vnode, document.body)
        app.config.globalProperties.$Loading =  {
            show: () => vnode.component?.exposed?.show(),
            hide: () => vnode.component?.exposed?.hide(),
        }
    }
}